package cn.demon.org.service.impl;


import cn.demon.basic.service.impl.BaseServiceImpl;
import cn.demon.basic.util.PageList;
import cn.demon.org.domain.Employee;

import cn.demon.org.mapper.EmployeeMapper;
import cn.demon.org.query.EmployeeQuery;
import cn.demon.org.service.IEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;


/**
 * 业务实现类：员工
 */
@Service
public class EmployeeServiceImpl extends BaseServiceImpl<Employee> implements IEmployeeService {


    @Autowired
    private EmployeeMapper employeeMapper;

    @Override
    public void add(Employee employee) {
        super.add(employee);
        employeeMapper.addEmployeeRole(employee.getId(),employee.getRole_id());
    }


    @Override
    public PageList<Employee> list(Long shopId) {
        return employeeMapper.list(shopId);
    }
}
